feat(examples): add useDevicePixels toggle to basemap-browser - #10332
Conversation
This reverts commit b13922f.
Adds a checkbox to test useDevicePixels override (toggles between true and 1.5) across all renderer configurations. This helps verify that custom DPR settings are correctly forwarded in attached-gl/interleaved mode paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… test pages Pass pixelRatio to MapLibre/Mapbox Map constructor when useDevicePixels is set to a custom value, since the basemap owns the canvas in interleaved mode. Also adds standalone HTML test pages for validating useDevicePixels across deck.gl 9.1, 9.2, 9.3, and local builds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…p-browser-use-device-pixels
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…p-browser-use-device-pixels
…p-browser-use-device-pixels
ibgreen
left a comment
There was a problem hiding this comment.
Nice.
I really try to avoid overloading props (number, false) these days, the number of checks needed in this PR is an example of why...
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8b16bf9. Configure here.
Indeed.. the test surface grows fast too. You've championed a few subtle but useful design principles like this over time. Flattened props over nesting comes to mind as well. Have you considered taking a pass on the code guidelines developer process docs with lessons from the field? I imagine a future where we can pipe these into AGENTS.md and Skill files |
…p-browser-use-device-pixels
…p-browser-use-device-pixels

Summary
useDevicePixelscheckbox to the basemap-browser control panel (toggles betweentrueand1.5)Test plan
useDevicePixelsis silently ignored, buffer dimensions won't change🤖 Generated with Claude Code
Note
Low Risk
Example-only changes with no production library logic; limited blast radius to the basemap-browser demo.
Overview
Adds a
useDevicePixelsdimension to the basemap-browser example so you can exercise deck’s drawing-buffer resolution across basemaps and frameworks.The control panel includes a pixel ratio override checkbox (toggles between default/
trueand 1.5), with the value reflected in the URL query string and in debug labeling. Validation warns when Mapbox is used in interleaved mode with a non-default override, since the shared canvas cannot honor it.The setting is passed through
buildConfiginto every renderer path: standalone Deck, Mapbox/MapLibre overlays, and Google Maps overlays (pure JS and React). MapLibre also maps overrides topixelRatioon the map instance and remount keys when the override changes, so buffer dimensions in Debug Info can be compared against deck-only mode.Reviewed by Cursor Bugbot for commit d0d8bf8. Bugbot is set up for automated code reviews on this repo. Configure here.